	subroutine newangle
	include 'cst.inc'

c*****************************************************************
c --- There is some approximation here; need improvement ---
c*****************************************************************
c
c --- Calculate the angle for all the shoreline node
c
   	imm=imax-1
	do i=2,imm
 	   sangle(i)=atan((yshore(i+1)-yshore(i-1))/
     +	                (xshore(i+1)-xshore(i-1)))
      enddo
c	sangle(1)=atan((yshore(2)-yshore(1))/(xshore(2)-xshore(1)))
c	sangle(imax)=atan((yshore(imax)-yshore(imm))/
c     +	                  (xshore(imax)-xshore(imm)))
 	sangle(1)=sangle(2)           !This is the preferred approximation due to the shoreline shape
	sangle(imax)=sangle(imax-1)
c
c --- Smoothing ----
c    
      do i=2,imm
         sangle(i)=(sangle(i-1)+sangle(i)+sangle(i+1))/3.
      enddo
	sangle(1)=sangle(2)
	sangle(imax)=sangle(imax-1)

	return
	end